<template>
    <div class="system-manage-template">
        <h4 class="header">系统对接管理</h4>
        <div class="content">
            <SimpleSystemTemplate class="task" refName="task" title="任务" :systemDocking="TaskSystemDocking"
                                  :systemSearch="taskSystemSearch"></SimpleSystemTemplate>
            <SimpleSystemTemplate class="todo" refName="todo" title="实施" :systemDocking="todoSystemDocking"
                                  :systemSearch="todoSystemSearch"></SimpleSystemTemplate>
            <SimpleSystemTemplate class="resourceOA" refName="resourceOA" title="资源OA" :systemDocking="OASystemDocking"
                                  :systemSearch="OASystemSearch"></SimpleSystemTemplate>
            <SimpleSystemTemplate class="institutions" refName="institutions" title="机构后台"
                                  :systemDocking="JGSystemDocking" :systemSearch="JGSystemSearch"
                                  :showSearchArea="false"></SimpleSystemTemplate>
        </div>
    </div>
</template>

<script>
    import SimpleSystemTemplate from "@/components/SimpleSystemTemplate.component"

    export default {
        name: "SystemManage",
        components: {
            SimpleSystemTemplate
        },
        data() {
            return {
                TaskSystemDocking: {
                    username: '',
                    password: '',
                },
                taskSystemSearch: {
                    searchValue: '',
                    region: ''
                },
                todoSystemDocking: {
                    username: '',
                    password: '',
                },
                todoSystemSearch: {
                    searchValue: '',
                    region: ''
                },
                OASystemDocking: {
                    username: '',
                    password: '',
                },
                OASystemSearch: {
                    searchValue: '',
                    region: ''
                },
                JGSystemDocking: {
                    username: '',
                    password: '',
                },
                JGSystemSearch: {
                    searchValue: '',
                    region: ''
                }
            }
        },
        methods: {
            /**
             * 系统登录
             * @param ref
             */
            submitLogin(ref) {
                ref.validate((valid) => {
                    if (valid) {
                        console.log('submit!');
                    } else {
                        console.log('error submit!!');
                        return false;
                    }
                });
            },
            /**
             * 系统查询
             * @param formName
             */
            submitSearch(formName) {
                console.log(formName)
            }
        }
    }
</script>

<style lang="scss">
    @import "src/common/common.style";
    .system-manage-template {
        width: 100%;
        height: 100%;
        background-color: #fff;
        .header {
            text-align: center;
        }
        .content {

        }
    }
</style>